import { request } from './request.js'

//加入书籍
export function setBook(data){
  return request({
    url:'/setBookMessage',
    method:'post',
    data:data
  })
}

// 查询书籍
export function getBook(){
  return request({
    url:'/getBookMessage',
    method:'post',
  })
}

// 选择查看某个书籍
export function chooseBook(data){
  return request({
    url:'/chooseBookMessage',
    method:'post',
    data:data
  })
}

// 删除某个书籍
export function deleteBook(data){
  return request({
    url:'/deleteBook',
    method:'post',
    data:data
  })
}

//筛选书籍
export function screenBook(data){
  return request({
    url:'/screenBook',
    method:'post',
    data:data
  })
}

//借书
export function lendBook(data){
  return request({
    url:'/lendBook',
    method:'post',
    data:data
  })
}

//根据id查询已借书籍
export function getBookById(data){
  return request({
    url:'/getBookById',
    method:'post',
    data:data
  })
}

//根据id查询借还书记录
export function getBookRecord(data){
  return request({
    url:'/bookRecord',
    method:'post',
    data:data
  })
}

//获取图书图片
export function getBookImg(data){
  return request({
    url:'/getimg',
    method:'post',
    data:data
  })
}